FROM php:8.3.16-fpm
RUN sed -i -e 's/deb.debian.org/mirrors.aliyun.com/g' -e 's/security.debian.org/mirrors.aliyun.com/g' -e '/^Components:/s/$/ contrib/' /etc/apt/sources.list.d/debian.sources
COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/local/bin/
RUN install-php-extensions gd zip intl ldap pgsql exif opcache soap
COPY php.ini /usr/local/etc/php/
RUN apt update && apt install -y ghostscript aspell graphviz poppler-utils cron
COPY moodlecron /etc/cron.d/moodlecron
RUN /usr/bin/crontab /etc/cron.d/moodlecron
RUN /etc/init.d/cron start

